package com.owen.oauth2.resource.controller;

import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
public class TestController {

    @RequestMapping("/user")
    public Object user(Authentication authentication){
        return authentication.getPrincipal();
    }

}
